/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 *
 * @author Pham
 */
public class DTOOrder {
    String orderId;
    Date orderDateCreated;
    String orderGuessName;
    String orderGuessAddress;
    String orderGuessPhone;
    String orderGuessEmail;
    int orderState;
    Date dateExport;
    
    //accessor
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Date getOrderDateCreated() {
        return orderDateCreated;
    }

    public void setOrderDateCreated(Date orderDateCreated) {
        this.orderDateCreated = orderDateCreated;
    }

    public String getOrderGuessName() {
        return orderGuessName;
    }

    public void setOrderGuessName(String orderGuessName) {
        this.orderGuessName = orderGuessName;
    }

    public String getOrderGuessAddress() {
        return orderGuessAddress;
    }

    public void setOrderGuessAddress(String orderGuessAddress) {
        this.orderGuessAddress = orderGuessAddress;
    }

    public String getOrderGuessPhone() {
        return orderGuessPhone;
    }

    public void setOrderGuessPhone(String orderGuessPhone) {
        this.orderGuessPhone = orderGuessPhone;
    }

    public String getOrderGuessEmail() {
        return orderGuessEmail;
    }

    public void setOrderGuessEmail(String orderGuessEmail) {
        this.orderGuessEmail = orderGuessEmail;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public Date getDateExport() {
        return dateExport;
    }

    public void setDateExport(Date dateExport) {
        this.dateExport = dateExport;
    }
    
    //constructor
    public DTOOrder()
    {}
    
    public DTOOrder(ResultSet rs) throws SQLException
    {
        this.orderId = rs.getString("order_id");
        this.orderDateCreated = rs.getDate("order_datecreated");
        this.orderGuessName = rs.getString("order_guessname_delivery");
        this.orderGuessAddress = rs.getString("order_guessaddress_delivery");
        this.orderGuessEmail = rs.getString("order_guessemail_delivery");
        this.orderGuessPhone = rs.getString("order_guessphone_delivery");
        this.orderState = rs.getInt("order_state");
        this.dateExport = rs.getDate("date_export");
    }
}
